<template>
  <el-popover placement="bottom" width="400px" v-model="show">
    <el-button
      slot="reference"
      circle
      plain
      :type="enable?'success':'info'"
      :disabled="!enable"
      icon="el-icon-download"
      style="margin-left:12px"
    ></el-button>
    <el-container>
      <el-header>
        <h2>导出到Excel</h2>
      </el-header>
      <el-main style="maxHeight:calc(100vh - 300px)">
        <export-view @close="show=false" />
      </el-main>
    </el-container>
  </el-popover>
</template>

<script>
import ExportView from "./ExportView";

export default {
  components: {
    ExportView,
  },
  computed: {
    enable() {
      return this.$store.state.query.sourceInspect.length > 0;
    },
  },
  data() {
    return {
      show: false,
    };
  },
};
</script>